<template>
	<view class="index-content">
		<view class="box_inst">
			<span style="color: #999;">设备总数：</span>{{onNum}}台
		</view>
		<view class="bodys">
			<view class="inbody"  @tap="gotail(v.barCounterId)" v-for="(v,i) in list" :key="i">
				<view class="boby_hedar">
					<view style="font-weight: 600;">{{v.barCounterRegion}}</view>
					<view style= "width: 120rpx; color: #999; display: flex; align-items: center;">
					<span>查看</span>
					<img style="width: 25rpx; height: 25rpx;padding-left: 10rpx;" src="@/static/img/Right.png" alt="">
					</view>
				</view>
				<view class="body_inst">
					编号:{{v.number}}
				</view>
				<view class="body_foot">
					<view class="foot_onst">
						<p style='color:rgb(213,139,0);'>{{v.totalIncome=='null'?0:v.totalIncome}}</p>
						<p>总收益</p>
					</view>
					<view class="foot_onst">
						<p style='color:rgb(213,139,0);'>{{v.dayIncome=='null'?0:v.dayIncome}}</p>
						<p>今日收益</p>
					</view>
					<view class="foot_onst">
						<p style='color:rgb(213,139,0);'>{{v.monthIncome=='null'?0:v.monthIncome}}</p>
						<p>本月收益</p>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
import{
	notiBy
}from '@/api/work/notice.js'

export default {
  
  data () {
    return {
		list:[],
		onNum:0
    }
  },
  onShow () {
	  this.page()
  },
  methods: {
	  page(){
		let investorld=localStorage.getItem('InvestorId')  
		notiBy({pageNum:1,investorld:investorld,pageSize:10}).then(res=>{
			this.list=res.data.list
			this.onNum=res.data.total
		})  
	  },
	gotail(barCounterId){
		uni.navigateTo({
			url:'/pages/work/detail?barCounterId='+ barCounterId
		})
	}
  }
}
</script>

<style>
	page{
		background-color: #f4f4f4;
	}
</style>
<style lang="scss" scoped>
	.index-content {
		margin: 20rpx;
	}
	.box_inst{
		width: 100%;
		font-size: 30rpx;
		font-weight: 600;
	}
	.bodys{
		width: 100%;
	}
	.inbody{
		background-color: #fff;
		border-radius: 10px;
		padding: 20rpx;
		margin-top: 20rpx;
	}
	.boby_hedar{
		display: flex;
		font-size: 14px;
		justify-content: space-between;
		align-items: center;
		view{
			padding: 10px;
		}
	}
	.body_inst{
		color: #999;
		font-size: 12px;
		padding: 0px 10px;
	}
	.body_foot{
		display: flex;
		justify-content: space-around;
		align-items: center;
		font-weight: 600;
	}
	.foot_onst{
		display: flex;
flex-direction: column;
align-items: center;
padding: 10px;
view{
	padding: 5px;
}
	}
</style>